<?php

	// Turn off all error reporting
	error_reporting(0);

	function errorHandler($errno, $errstr, $errfile, $errline) {
		switch ($errno) {
		case E_USER_ERROR:
			$errText="<b>ERROR</b> [$errno] $errstr<br />\n  Fatal error on line $errline in file $errfile, PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\nAborting...<br />\n";
			break;

		case E_USER_WARNING:
			$errText="<b>WARNING</b> [$errno] $errstr<br />\n";
			break;

		case E_USER_NOTICE:
			$errText="<b>NOTICE</b> [$errno] $errstr<br />\n";
			break;

		default:
			$errText="Unknown error type: [$errno] $errstr<br />\n";
			break;
		}
		echo 'success=0&errorText='.urlencode($errText);
		exit;
		return true;
	}

	set_error_handler("errorHandler");

?>